Skip to content

Extend release-time Compose-template validation to llama.cpp and SearXNG - #21

Merged
kasunben merged 1 commit into
mainfrom
feat/compose-template-validation-for-all-images
Aug 22, 2026
Merged

kasunben merged 1 commit into
mainfrom
feat/compose-template-validation-for-all-images

Conversation

@kasunben

Copy link
Copy Markdown
Member

Summary

  • validate_appliance_configuration previously rendered and ran docker compose config --quiet against Pi-hole's Compose template only — a malformed llama/compose.yaml.in or searxng/compose.yaml.in would pass validate_release_payload silently and only fail later, at real Compose-up time on a device
  • Generalizes into COMPOSE_TEMPLATES, the same data-driven loop shape IMAGE_COMPONENTS already established for image-import validation
  • Extracts the pure rendering logic into render_compose_template(), independently unit-testable without needing a full appliance fixture
  • Handles llama's second placeholder (@LLAMA_MODEL_FILENAME@, substituted by start-llama-server at deploy time, not release-validation time) and SearXNG's SEARXNG_SECRET env-var reference (mirroring start-searxng's own real invocation shape)
  • Closes the exact gap named as a follow-up in ROADMAP.md and the SearXNG signed-release qualification assessment

Test plan

  • New tests/test_appliance_compose_validation.py (12 tests): pure-logic rendering/rejection tests, plus docker-gated tests (real docker, not the fake stub used elsewhere in this suite) confirming all three real templates pass and a structurally broken template is rejected
  • python3 -m unittest discover -s tests -v — 634/634 pass (622 previous + 12 new)
  • Manually verified against real docker compose config on this machine before writing tests

🤖 Generated with Claude Code

validate_appliance_configuration only rendered and validated Pi-hole's
Compose template against `docker compose config` before activation; a
malformed llama/compose.yaml.in or searxng/compose.yaml.in would pass
release validation silently and only fail later, at real Compose-up
time on a device. Generalizes the same loop shape IMAGE_COMPONENTS
already established (COMPOSE_TEMPLATES), handling llama's second
deploy-time placeholder and SearXNG's SEARXNG_SECRET env-var reference.

Verified against real docker (not the fake stub used elsewhere in this
suite) that all three real templates pass and a structurally broken
one is rejected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kasunben
kasunben marked this pull request as ready for review August 22, 2026 08:31
@kasunben
kasunben merged commit d485c9b into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant